void numberTest() {
  // String -> int
  var one = int.parse('1');
  print(one);
  assert(one == 1);

  // String -> double
  var onePointOne = double.parse('1.1');
  print(onePointOne);
  assert(onePointOne == 1.1);

  // int -> String
  String oneAsString = 1.toString();
  print(oneAsString);
  assert(oneAsString == '1');

  // double -> String
  String piAsString = 3.14159.toStringAsFixed(2);
  print(piAsString);
  assert(piAsString == '3.14');



  // num 类型按位操作的例子
  var leftThree = (3 << 1);
  print(leftThree.toString());
  assert(leftThree == 6);  // 0011 << 1 == 0110

  var rightThree = (3 >> 1);
  print(rightThree.toString());
  assert(rightThree == 1);  // 0011 >> 1 == 0001

  var threeOrFour = (3 | 4);
  print(threeOrFour.toString());
  assert(threeOrFour == 7);  // 0011 | 0100 == 0111
}